<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const canvas = document.createElement('canvas')
        canvas.width = 800;
        canvas.height = 600;
        document.body.append(canvas)
        const context = canvas.getContext('2d')

        const g = context.createLinearGradient(100,50,300,120)
        g.addColorStop(0,'red');
        g.addColorStop(0.25,'yellow');
        g.addColorStop(.5,'orange');
        g.addColorStop(.75,'skyblue');
        g.addColorStop(1,'green');

        context.font = 'bold italic 32px Arial'
        context.fillStyle = g;
        context.strokeStyle = g;
        // context.fillText('wolfcode.cn',100,100)
        context.strokeText('wolfcode.cn',100,100)
    </script>
</body>
</html>